package com.dk.service.impl;

import com.dk.Vo.TUserCardVo;
import com.dk.mapper.TUserCardMapper;
import com.dk.pojo.TUserCard;
import com.dk.service.TUserCardServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TUserCardServiceImpl implements TUserCardServiceI {

    @Autowired
    private TUserCardMapper tUserCardMapper;

    @Override
    public List<TUserCardVo> getInfoServer() {
        return tUserCardMapper.getInfoServer();
    }

    @Override
    public void saveById(TUserCard tUserCard) {
        tUserCardMapper.insertSelective(tUserCard);
    }

    @Override
    public  TUserCard  getAllfind(Integer userId) {
        return tUserCardMapper.selectByPrimaryKey(userId);
    }

    @Override
    public void deleteById(Integer userId) {
        tUserCardMapper.deleteByPrimaryKey(userId);
    }

    @Override
    public void updateById(TUserCard tUserCard) {
        tUserCardMapper.updateByPrimaryKeySelective(tUserCard);
    }
}
